﻿
package com.ostrich.project.service.impl;


import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.base.page.BasePage;
import com.base.service.BaseService;
import com.ostrich.project.bean.TostPjTeammemberinfo;
import com.ostrich.project.service.TostPjTeammemberinfoDao;
/**
 * @author wangyinan
 * @brief    模块功能简单描述
 * @details  模块功能详细描述
 */
@Service("tostPjTeammemberinfoService")
public class TostPjTeammemberinfoService<T> extends BaseService<T> {
	private final static Logger log= Logger.getLogger(TostPjTeammemberinfoService.class);

	@Autowired
    private TostPjTeammemberinfoDao<T> dao;

	public TostPjTeammemberinfoDao<T> getDao() {
		return dao;
	}
	//查询项目参与的部门
		public List<Map<String, Object>> queryDpartByPjid(TostPjTeammemberinfo tpt){
			return dao.queryDpartByPjid(tpt);
		}

	public int queryCount(TostPjTeammemberinfo page){
		return getDao().queryCount(page);
	}
	public List<Map<String,Object>> queryBytenmmeage(TostPjTeammemberinfo tostPjTeammemberinfo){
		Integer rowCount = queryCount(tostPjTeammemberinfo);
		tostPjTeammemberinfo.getPager().setRowCount(rowCount);
		return getDao().queryBytenmmeage(tostPjTeammemberinfo);
	}
	public List<Map<String,Object>> queryprijectByhdpid(String hdp_id){
		return getDao().queryprijectByhdpid(hdp_id);
	}
	public List<Map<String,Object>> queryproject(TostPjTeammemberinfo tostPjTeammemberinfo){
		return getDao().queryproject(tostPjTeammemberinfo);
	}
	public int queryCountpro(TostPjTeammemberinfo page){
		return getDao().queryCountpro(page);
	}
	
	//查询没有参加项目的人的信息
		public List<T> queryperBydpid(String hdpId,Integer pjId){
			Map<String,Object> mp=new HashMap<String,Object>();
			mp.put("hdpId", hdpId);
			mp.put("pjId",pjId);
			return getDao().queryperBydpid(mp);
		}
		
		
		//根据项目id查询出部门的相关内容
		public  List<Map<String,Object>> querydepartbypjid(Integer pjId){
			return getDao().querydepartbypjid(pjId);
		}
		//根据项目id查询出人员的相关内容
		public  List<Map<String,Object>> querypersonbypjid(Integer pjId){
			return getDao().querypersonbypjid(pjId);
		}		
		
		
   //查询参与项目的人，以供删除参加姓名的人
		public List<T> queryDelList(String hdpId){
		return 	getDao().queryDelList(hdpId);
		}
		
		public void updateInfo(T t){
			getDao().updateInfo(t);
		}
}
